package com.sservice.model.dao;


import com.sservice.commonBusiness.e.Category;
import com.sservice.model.entity.OrderShop;
import com.sservice.model.vo.OrderShopVo;

import java.util.List;

/**
 * 商品订单关系DAO
 * Created by suweiming on 2018/10/23.
 */
public interface OrderShopMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(OrderShop record);

    int insertSelective(OrderShop record);

    OrderShop selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(OrderShop record);

    int updateByPrimaryKey(OrderShop record);

    /**
     * 批量更新
     *
     * @param record
     * @return
     */
    int updateBy(OrderShop record);

    /**
     * 批量添加订单
     *
     * @param list
     * @return
     */
    int addBatch(List<OrderShop> list);

    /*根据购物车中选中物品获取供货地列表*/
    List<Category> getDeliverPlaceCheckedInCart(OrderShop record);

    /*根据供货地查询当前需结算的购物车中物品*/
    List<OrderShopVo> dealItemsDeliverPlaceCheckedInCart(OrderShopVo record);

    /**
     * 根据条件查询order_shop项
     *
     * @param record
     * @return
     */
    List<OrderShop> getOrderShopBy(OrderShop record);

}